<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="my" uri="mytag" %> 
<html> 
<head> 
<title>人力资源管理系统</title> 
	<link rel="stylesheet" type="text/css" href="../easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../easyui/themes/icon.css">
	<script type="text/javascript" src="../easyui/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="../easyui/jquery.easyui.min.js"></script>
	
	<link rel="stylesheet" type="text/css" href="../css/common.css">
	<link rel="stylesheet" type="text/css" href="../css/table.css">

<style type="text/css">
</style>
<script>
function openWin(url){
	window.target="contentFrame";
	window.location = url;
}
function remove(user_id){
	var url = "delete.html?user_id="+user_id;
	$.messager.confirm('提示', '确认删除？', function(r){
		if (r){
			location.href = url;
		}
	});
}
</script>
</head> 
<body>
<table width="80%" border="0" cellspacing="0"  align="center" cellpadding="0" class="ListTable">
	<thead>
	<tr>
		<td align="center"  class="TableRow" nowrap>员工编号</td>
		<td align="center"  class="TableRow" nowrap>姓名</td>
		<td align="center"  class="TableRow" nowrap>性别</td>
		<td align="center"  class="TableRow" nowrap>部门</td>
		<td align="center"  class="TableRow" nowrap>岗位</td>
		<td align="center"  class="TableRow" nowrap>电话</td>
		<td align="center"  class="TableRow" nowrap>分机号</td>
		<td align="center"  class="TableRow" nowrap>操作</td>
	</tr>
	</thead>
	<tbody>
	<c:forEach items="${users}" var="user">
	<tr class="trShallow">
		<td align="center" class="RecordRow" nowrap>${user.user_id}</td>
		<td align="center" class="RecordRow" nowrap><a href="user.html?userId=${user.user_id}"> ${user.name}</a></td>
		<td align="center" class="RecordRow" nowrap>
			<c:choose>
				<c:when test="${user.gender==0}">男</c:when>
				<c:otherwise>女</c:otherwise> 
			</c:choose> </td>
		<td align="center" class="RecordRow" nowrap>
			<c:set value = "${user.department_code}"  var = "department_code" />    
				${my:getDepartment(department_code)}
		</td>
		<td align="center" class="RecordRow" nowrap>${user.post_id}</td>
		<td align="center" class="RecordRow" nowrap>${user.cell_phone}</td>
		<td align="center" class="RecordRow" nowrap>${user.work_phone}</td>
		<td align="center" class="RecordRow" nowrap><a href="#" onclick="openWin('prepareEditUser.html?userId=${user.user_id}')">修改</a> |  &nbsp;<a href="#" target="_self" onclick="remove('${user.user_id}')">删除</a></td>
	</tr>
	</c:forEach>
	<tbody>	
</table>
<table  width="80%" align="center" class="RecordRowP">
		<tr>
		    <td valign="bottom" class="tdFontcolor">
		            第1 页 共${fn:length(users)}条 共 1 页
			</td>
	              <td  align="right" nowrap class="tdFontcolor">
		          <p align="right">
		          <input type="hidden" name="listpagination" value="baseNetSignInForm">
		          <input type="hidden" name="current" value="1">
		          <input type="hidden" name="paginationDbAction" value="">首页&nbsp上页&nbsp下页&nbsp末页&nbsp第
		          <input type=text size='2' name='pageSelect' value='' onkeypress='checkNumber(this,event)'/>页&nbsp
		          <a href="#" onclick="">
		          <img src="../images/go.gif" border=0 ></a>
			</td>
		</tr>
    
  </table> 
  <table  width="80%" align="center">
		<tr>
		    <td align="center">	
		        <input type="button" class="mybutton" value='添加员工' onclick="openWin('prepareEditUser.html')"/> 
			</td>
		</tr>
  </table>
</body>
</html>